import { CopyInfoPanelBase } from "../CopyInfoPanelBase";
import { Language } from "../../../../../extend/language/Language";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { ObjCreate } from "../../common/ObjCreate";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
import { FilterConst } from "../../../../component/gconst/FilterConst";
import { ProgressBarStyle } from "../../player/ProgressBarStyle";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { SecTimerView } from "../../common/SecTimerView";
import { ProgressBase } from "../../player/ProgressBase";
type int = number;
//class RobFlagCopyInfoPanel
    
    export  class RobFlagCopyInfoPanel extends CopyInfoPanelBase
    {
        constructor(arg1: string="MagicTowerInfoButtonBg")
        {
            super(arg1);
            this.title = Language.getString(80521);
            return;
        }

        public updateLeftTime(arg1: int): void
        {
            this._leftTime.setLeftTime(arg1, true);
            return;
        }

        public updateProgress(arg1: int, arg2: int, arg3: int=100): void
        {
            this._barReg.setValue(arg1, arg3);
            this._barBlue.setValue(arg2, arg3);
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            var loc1=GlobalStyle.textFormat1;
            loc1.leading = 3;
            loc1.align = flash.text.TextFormatAlign.LEFT;
            this._leftTime = ObjCreate.createSecTimeView(HTMLUtil.addColor(Language.getString(80522), "#ffff00"), 10, 6, 200, 20, _bodySp, loc1);
            this._leftTime.setLeftTime(900, false);
            this._leftTime.filters = [FilterConst.glowFilter];
            this._bmpRegMan = ObjCreate.createBitmap(null, 10, 30, _bodySp);
            this._bmpBlueMan = ObjCreate.createBitmap(null, 10, 54, _bodySp);
            ObjCreate.createGTextField(HTMLUtil.addColor(Language.getString(80523), GlobalStyle.red), 26, this._bmpRegMan.y, 50, 20, _bodySp, loc1, true);
            ObjCreate.createGTextField(HTMLUtil.addColor(Language.getString(80524), GlobalStyle.blue), 26, this._bmpBlueMan.y, 50, 20, _bodySp, loc1, true);
            this._barReg = ObjCreate.createProgressBar(67, 30, 100, 17, _bodySp, ProgressBarStyle.red);
            this._barBlue = ObjCreate.createProgressBar(67, 54, 100, 17, _bodySp, ProgressBarStyle.blue);
            var loc2=ObjCreate.createGTextField("", 20, 74, 235, 150, _bodySp, loc1);
            loc2.multiline = true;
            loc2.wordWrap = true;
            loc2.htmlText = Language.getString(80532);
            LoaderHelp.addResCallBack(ResFileConst.RobFlag, this.resGotHandler);
            return;
        }

        /* internal  */resGotHandler(): void
        {
            this._bmpRegMan.bitmapData = GlobalClass.getBitmapData(ImagesConst.RobFlag_Man);
            this._bmpBlueMan.bitmapData = GlobalClass.getBitmapData(ImagesConst.RobFlag_Man);
            return;
        }

        /* internal */ /* var */_leftTime: SecTimerView;

        /* internal */ /* var */_bmpRegMan: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_bmpRegFlag: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_barReg: ProgressBase;

        /* internal */ /* var */_bmpBlueMan: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_bmpBlueFlag: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_barBlue: ProgressBase;
    }
